package com.ydche.dao.impl;

import com.ydche.client.SimpleClient;
import com.ydche.dao.IAccountDao;
import com.ydche.idl_output.Account;
import com.ydche.util.MyException;
import org.springframework.stereotype.Service;

@Service
public class AccountDaoImpl implements IAccountDao {
    @Override
    public int addAccount(Account account) {
        int id = 0;
        try {
            id = SimpleClient.getClient().add_account(account);
        } catch (Exception e) {
            MyException.handleThriftException(e);
        }
        return id;
    }
}
